package com.probox.common.core.enums;

public enum OrderTypeEnum {
    //vip充值/good商品/gift赠品/lottery奖品

    vip("vip", "VIP会员"),
    balance("balance", "充余额"),
    recharge("recharge", "充值"),
    bargain("bargain", "砍价"),
    seckill("seckill", "秒杀"),
    limittime("limittime", "限时"),
    group("group", "团购"),
    free("free", "新人免费领"),
    packages("packages", "套餐"),
    score("score", "积分兑换"),
    good("good", "下载"),
    exchange("exchange", "兑换"),
    gift("maiduan", "买断"),
    lottery("lottery", "奖品"),
    card("card", "套餐卡"),
    service("service", "服务项目"),
    store("store","门店"),
    serviceCard("serviceCard", "服务项目套餐");


    private OrderTypeEnum(String k, String v) {
        this.setKey(k);
        this.setValue(v);
    }

    public static String getNameByKey(String key) {
        String rst = "";
        for (OrderTypeEnum oe : OrderTypeEnum.values()) {
            if (oe.getKey().equals(key)) {
                rst = oe.getValue();
            }
        }
        return rst;
    }

    private String key;
    private String value;

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }
}
